import useRequest from '@/utils/request'

const request = useRequest({})
// 查询公告列表
export function listNotice(query: any) {
  return request.get('/system/notice/list', {
    params: query,
  })
}

// 查询公告详细
export function getNotice(noticeId: string) {
  return request.get('/system/notice/' + noticeId)
}

// 新增公告
export function addNotice(data: any) {
  return request.post('/system/notice', data)
}

// 修改公告
export function updateNotice(data: any) {
  return request.put('/system/notice', data)
}

// 删除公告
export function delNotice(noticeId: string) {
  return request.delete('/system/notice/' + noticeId)
}
